<!-- top tiles -->
		<div class="panel panel-default">
			<div class="panel-body">
				<div class="row tile_count">
					<div class="col-md-2 col-sm-4 col-xs-6 tile_stats_count">
					  <span class="count_top"><i class="fa fa-user"></i> Total Connections</span>
					  <div class="count"><?= $content['node']->toConn ?></div>
					  <span class="count_bottom"><span class="green" ><i class="fa fa-plus"></i><?= $content['nPeers'] ?></span> New Peers</span>
					</div>
					<div class="col-md-2 col-sm-4 col-xs-6 tile_stats_count">
					  <span class="count_top"><i class="fa fa-cloud-upload"></i> Total Upload Traffic (GB)</span>
					  <div class="count"><?= ($content['node']->tOut >= 1000) ? round($content['node']->tOut/1000,2)." <small>TB</small>" : $content['node']->tOut ?></div>
					  <span class="count_bottom"><i class="fa fa-angle-right"></i><?= ($content['cTrafficOut'] >= 1000) ? round($content['cTrafficOut']/1000,2)." TB" : $content['cTrafficOut']." GB"?></i> Current Peers</span>
					</div>
					<div class="col-md-2 col-sm-4 col-xs-6 tile_stats_count">
					  <span class="count_top"><i class="fa fa-cloud-download"></i> Total Download Traffic (GB)</span>
					  <div class="count"><?= ($content['node']->tIn >= 1000) ? round($content['node']->tIn/1000,2)." <small>TB</small>" : $content['node']->tIn ?></div>
					  <span class="count_bottom"><i class="fa fa-angle-right"></i><?= ($content['cTrafficIn'] >= 1000) ? round($content['cTrafficIn']/1000,2)." TB" : $content['cTrafficIn']." GB"?></i> Current Peers</span>
					</div>
					<div class="col-md-2 col-sm-4 col-xs-6 tile_stats_count">
					  <span class="count_top"><i class="fa fa-user fa-ban"></i> Banned Peers</span>
					  <div class="count"><?= $content['bannedPeers'] ?></div>
					  <span class="count_bottom"><i class="red"><i class="fa fa-plus"></i><?= $content['last24h'] ?></i> Last 24h</span>
					</div>
					<div class="col-md-2 col-sm-4 col-xs-6 tile_stats_count">
					  <span class="count_top"><i class="fa fa-database"></i> TX in Mempool</span>
					  <div class="count"><?= number_format($content['node']->mempoolTx) ?></div>
					  <span class="count_bottom"><i class="<?= $content['node']->mempoolUsageP['color'] ?>"><i class="fa <?= $content['node']->mempoolUsageP['icon'] ?>"></i> <?= $content['node']->mempoolUsageP['value'] ?>%</i> Usage</span>
					</div>
					<div class="col-md-2 col-sm-4 col-xs-6 tile_stats_count">
					  <span class="count_top"><i class="fa fa-cube orange"></i> Lastest Block</span>
					  <div class="count"><?= $content['node']->bHeight ?></div>
					  <span class="count_bottom"><i class="oranges"><i class="fa fa-clock-o"></i> <?= $content['node']->bHeightAgo ?> m</i> ago</span>
					</div>
				</div>
			</div>
		</div>
		<!-- /top tiles -->
    <!-- Message -->
    <?php if(!empty($message)){ ?>
    <div class="row">
      <div class="col-md-3 col-sm-3 col-xs-12">
        <div class="alert alert-success" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
          <?= $message ?>
        </div>
      </div>
    </div>
    <?php } ?>
    <!-- Message End -->
		<!-- Content -->
		<div class="row">
			<div class="col-md-4 col-sm-4 col-xs-12">
			  <div class="x_panel tile fixed_height_320">
				<div class="x_title">
				  <h2>Node</h2>
				  <ul class="nav navbar-right panel_toolbox">
					<li><a class="close-link"><i class="fa fa-close"></i></a>
					</li>
					<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
					</li>
				  </ul>
				  <div class="clearfix"></div>
				</div>
				<div class="x_content">
				  <table class="mempooltable">
				  <tr><td style="width:40%;"><i class="fa fa-id-card-o fa-fw"></i> Client </td><td><?= $content['node']->client ?></td></tr>
				  <tr><td><i class="fa fa-exchange fa-fw"></i> Protocol </td><td> <?= $content['node']->proVer ?></td></tr>
				  <tr><td><i class="fa fa-wifi fa-fw"></i> Port </td><td> <?= $content['node']->port ?></td></tr>
				  <tr><td><i class="fa fa-bullhorn fa-fw"></i> Services </td><td>
					<?php if(isset($content['node']->services['Network'])){ ?><button type="button" class="btn btn-default btn-xs">Network</button><?php } ?>
					<?php if(isset($content['node']->services['Bloom'])){ ?><button type="button" class="btn btn-default btn-xs">Bloom</button><?php } ?>
					<?php if(isset($content['node']->services['Witness'])){ ?><button type="button" class="btn btn-default btn-xs">Witness</button><?php } ?>
					<?php if(isset($content['node']->services['Network Limited'])){ ?><button type="button" class="btn btn-default btn-xs">Network Limited</button><?php } ?>
          <?php if(isset($content['node']->services['Compact Filters'])){ ?><button type="button" class="btn btn-default btn-xs">Compact Filters</button><?php } ?>
					<?php if(isset($content['node']->services['None'])){ ?><button type="button" class="btn btn-default btn-xs">None</button><?php } ?>
					<?php if(isset($content['node']->services['Unknown'])){ ?><button type="button" class="btn btn-default btn-xs">Unknown</button><?php } ?>
					</td></tr>
					<tr><td><i class="fa fa-clock-o fa-fw"></i> Uptime </td><td> <?= $content['node']->uptime ?></td></tr>
				  <tr><td><i class="fa fa-clock-o fa-fw"></i> Node Time </td><td> <?= $content['node']->cTime ?></td></tr>
				  <tr><td><i class="fa <?php echo ($content['node']->ipv4 ? "fa-check-square-o green" : "fa-square-o") ?> fa-fw"></i> IPv4 </td><td> <?php echo  ($content['node']->ipv4Proxy ? '<i class="fa fa-user-secret fa-fw" title='.$content['node']->ipv4Proxy.'></i>' : ""); echo ($content['node']->ipv4 ? $content['node']->ipv4Address : "No") ?></td></tr>
				  <tr><td><i class="fa <?php echo ($content['node']->ipv6 ? "fa-check-square-o green" : "fa-square-o") ?> fa-fw"></i> IPv6 </td><td> <?php echo  ($content['node']->ipv6Proxy ? '<i class="fa fa-user-secret fa-fw" title='.$content['node']->ipv6Proxy.'></i>' : ""); echo ($content['node']->ipv6 ? $content['node']->ipv6Address : "No") ?></td></tr>
				  <tr><td><i class="fa <?php echo ($content['node']->tor ? "fa-check-square-o green" : "fa-square-o") ?> fa-fw"></i> Tor </td><td> <?php echo  ($content['node']->torProxy ? '<i class="fa fa-user-secret fa-fw" title='.$content['node']->torProxy.'></i>' : ""); echo ($content['node']->tor ? '<span class="tor-address" title='.$content['node']->torAddress.'>'.$content['node']->torVersion.'</span>' : "No") ?></td></tr>
				  <tr><td><i class="fa <?php echo (!$content['node']->pruMode ? "fa-square-o green" : "fa-check-square-o orange") ?> fa-fw"></i> Pruning Mode</td><td> <?php echo ($content['node']->pruMode ? "Yes" : "No") ?></td></tr>
				  <tr><td><i class="fa <?php echo ($content['node']->localRelay ? "fa-square-o green" : "fa-check-square-o orange") ?> fa-fw"></i> Block Only Mode</td><td> <?php echo ($content['node']->localRelay ? "No" : "Yes") ?></td></tr>
				  <tr><td><i class="fa <?php echo (!$content['node']->mempoolLimited ? "fa-square-o green" : "fa-warning red") ?> fa-fw"></i> Mempool Limited</td><td> <?php echo ($content['node']->mempoolLimited ? "Yes" : "No") ?></td></tr>
				  <tr><td><i class="fa <?php echo (!$content['node']->tLimitSet ? "fa-square-o green" : "fa-check-square-o orange") ?> fa-fw"></i> Traffic Limit Set</td><td> <?php echo ($content['node']->tLimitSet ? "Yes" : "No") ?></td></tr>
				  <?php if($content['node']->tLimitSet){ ?>
				  <tr><td><i class="fa <?php echo (!$content['node']->tLimited ? "fa-square-o green" : "fa-warning red") ?> fa-fw"></i> Traffic Limited</td><td> <?php echo ($content['node']->tLimited ? "Yes" : "No") ?> <small>(<?= $content['node']->tUsed ?> / <?= $content['node']->tMax ?> GB - <?= $content['node']->tLimitP ?>%)</small></td></tr>
				  <tr><td><i class="fa fa-hourglass-start fa-fw"></i> Time remaining </td><td> <?= $content['node']->tTimeLeft ?> hours</td></tr>
				  <?php } ?>
				  </table>
				</div>
			  </div>
			</div>
		<div class="col-md-3">
		<div class="row">

			 <div class="col-md-12 col-sm-12 col-xs-12">
			  <div class="x_panel tile fixed_height_320">
				<div class="x_title">
				  <h2>Blockchain</h2>
				  <ul class="nav navbar-right panel_toolbox">
					<li><a class="close-link"><i class="fa fa-close"></i></a>
					</li>
					<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
					</li>
				  </ul>
				  <div class="clearfix"></div>
				</div>
				<div class="x_content" style="padding-bottom:2px">
				  <table class="mempooltable">
					  <tr><td style="width:50%;"><i class="fa fa-clone fa-fw"></i> Chain </td><td> <span class="badge"><?= $content['node']->chain ?></span></td></tr>
					  <tr><td><i class="fa fa-hdd-o fa-fw"></i> Size </td><td> <?= $content['node']->bcSize ?> GB</td></tr>
					  <tr><td><i class="fa fa-key fa-fw"></i> Difficulty </td><td> <?= $content['node']->diff ?></td></tr>
					  <tr><td><i class="fa fa-cogs fa-fw"></i> Hashrate </td><td> <?= $content['node']->hashRate ?> EH/s</td></tr>
					  <tr><td><i class="fa fa-clock-o fa-fw"></i> Mediantime </td><td> <?= $content['node']->mNetTime ?></td></tr>
				  </table>
				</div>
			  </div>
			</div>


			<div class="col-md-12 col-sm-12 col-xs-12">
			  <div class="x_panel tile fixed_height_320">
				<div class="x_title">
				  <h2>Softforks</h2>
				  <ul class="nav navbar-right panel_toolbox">
					<li><a class="close-link"><i class="fa fa-close"></i></a>
					</li>
					<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
					</li>
				  </ul>
				  <div class="clearfix"></div>
				</div>
				<div class="x_content" style="padding-bottom:2px">
				 <?php
				 if(!empty($content['node']->softForks)){
					foreach($content['node']->softForks as $sfName => $sf) {?>
						  <table class="mempooltable">
							  <tr><td style="width:60%;"><i class="fa fa-id-card fa-fw"></i> Name </td><td> <span class="badge"><?= ucfirst($sfName) ?></span></td></tr>
							  <tr><td><i class="fa fa-info fa-fw"></i> Status </td><td> Voting</td></tr>
							  <tr><td><i class="fa fa-hourglass-start fa-fw"></i> Start </td><td> <?= $sf['start_time'] ?></td></tr>
							  <tr><td><i class="fa fa-hourglass-o fa-fw"></i> End </td><td> <?= $sf['timeout'] ?> <small>(<?= $sf['since'] ?>)</small></td></tr>
							  <tr><td><i class="fa fa-signal fa-fw"></i> Process </td><td> <?= $sf['process'] ?> %</td></tr>
						  </table>

			<?php	}
				}else{
					echo "No current soft forks";
				}
				  ?>
				</div>
			  </div>
			</div>


			</div>
			</div>
				<div class="col-md-5 col-sm-5 col-xs-12">
			  <div class="x_panel tile fixed_height_320 overflow_hidden">
				<div class="x_title">
				  <h2>Top Peer Clients</h2>
				  <ul class="nav navbar-right panel_toolbox">
					<li><a class="close-link"><i class="fa fa-close"></i></a>
					</li>
					<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
					</li>
				  </ul>
				  <div class="clearfix"></div>
				</div>
				<div class="x_content" style="margin:10px 0;">
				  <table class="" style="width:100%">
					<tr>
					  <td  style="width:51%;">
						<canvas id="topclients" height="240" width="240" style="margin: 0px 0px 0px 0"></canvas>
					  </td>
					  <td>
						<table class="countries_list">

						<?php $i = 1;
						foreach($content['chartData']['legend'] as $cName => $client){
						?>
							<tr>
								<td><?= $i ?>. <a href="index.php?p=peers&q=<?= $cName ?>"><?= $cName ?></a></td><td style="padding-right:0px;padding-left:0px;"><small>(<?= $client['share'] ?>%)</small></td>
							</tr>
						<?php
							$i++;
							}
						?>
						</table>
					  </td>
					</tr>
				  </table>
				</div>
			  </div>
			</div>


			</div>
			<!-- End first row -->



			<div class="clearfix"></div>
			<div class="row">

			<?php if($content['geo']){?>
			<!-- Wolrd Map -->
			<div class="col-md-10 col-sm-10 col-xs-12">
			  <div class="x_panel">
				<div class="x_title">
				  <h2>Global Peer Distribution</h2>
				  <ul class="nav navbar-right panel_toolbox">

					<li><a class="close-link"><i class="fa fa-close"></i></a></li>
          <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a></li>
					<li><a><i class="fa fa-question-circle-o" data-toggle="tooltip" data-html="true" data-placement="left" title="BNM will only check the country/isp for peers that are older than 5 minutes."></i></a></li>
          <?php if(isset($content['api'])) { ?><li><a><i class="fa fa-refresh" data-toggle="tooltip" data-html="true" data-placement="left" title="<?= $content["api"]["callc"] ?> call(s) to API with <?= $content["api"]["ipc"] ?> new ip(s)."></i></a></li><?php }?>

				  </ul>
				  <div class="clearfix"></div>
				</div>
				<div class="x_content">
				  <div class="dashboard-widget-content">
					<div class="col-md-4 hidden-small">
					  <table class="countries_list">
						<tbody>
						<?php $i = 1;
						foreach($content['map']['desc'] as $cName => $country){
						?>
							<tr>
              <td style="padding-right:0px;width:33px"><?= $i ?>.</td><td style="padding-left:0px;padding-right:0px;width:32px"><img src="assets/images/flags/16/<?= $cName ?>.png" /></td><td style="padding-left:2px;"><a href="index.php?p=peers&q=<?= $cName ?>"><?= $cName ?></a></td><td style="padding-right:0px;width:35px"><?= $country['count'] ?></td><td style="padding-left:0px;padding-right:0px;width:45px">(<?= $country['share'] ?>%)</td>
							</tr>
						<?php
							$i++;
						}
						?>
						</tbody>
					  </table>
					</div>
					<div id="world-map-gdp" class="col-md-8 col-sm-12 col-xs-12" style="height:330px;"></div>
				  </div>
				</div>
			  </div>
			</div>
			<!-- Wolrd Map End -->
			<?php } ?>




			</div>
		   </div>

		<!-- /page content -->

	<!-- footer content -->
	<?php include('views/footer.phtml') ?>
	<!-- /footer content -->

	</div>
	</div>

	<!-- jQuery -->
	<script src="assets/js/jquery.min.js"></script>
	<!-- Bootstrap -->
	<script src="assets/js/bootstrap.min.js"></script>
	<!-- Chart.js -->
	<script src="assets/js/Chart.min.js"></script>
	<!-- Custom Theme Scripts -->
	<script src="assets/js/custom.min.js"></script>
	<?php
	if($content['geo']){
		echo "<script>".$content['map']['data']."</script>";
	?>
		<!-- JQVMap -->
		<script src="assets/js/jquery.vmap.min.js"></script>
		<script src="assets/js/jquery.vmap.world.js"></script>
		<script>
		  $(document).ready(function(){
			$('#world-map-gdp').vectorMap({
				map: 'world_en',
				backgroundColor: null,
				color: '#ffffff',
				hoverOpacity: 0.7,
				selectedColor: '#666666',
				enableZoom: false,
				showTooltip: true,
				values: peerData,
				onLabelShow: function (event, label, code) {
					if (peerData[code]!==undefined)
					{
						label.append(' ('+peerData[code]+')');
					} else {
						label.append(' (No Peers)');
				   }
				},
				scaleColors: ['#deebf7', '#3182bd'],
				normalizeFunction: 'polynomial'
			});
		  });
		</script>
		<!-- /JQVMap -->
	<?php } ?>
	<!-- Doughnut Chart -->
	<script>
	  $(document).ready(function(){
		var options = {
		  legend: false,
		  responsive: false
		};

		new Chart(document.getElementById("topclients"), {
		  type: 'doughnut',
		  tooltipFillColor: "rgba(51, 51, 51, 0.55)",
		  data: {
			labels: [<?= $content['chartData']['labels'] ?>],
			datasets: [{
			  data: [<?= $content['chartData']['values'] ?>],
			  backgroundColor: [
				"#56E2CF",
				"#56AEE2",
				"#5668E2",
				"#8A56E2",
				"#CF56E2",
				"#E256AE",
				"#E25668",
				"#E28956",
				"#E2CF56",
				"#BCD39C"
			  ],
			  hoverBackgroundColor: [
				"#78F2DF",
				"#78C7F2",
				"#788BF2",
				"#A378F2",
				"#DF78F2",
				"#F278C7",
				"#F2788B",
				"#F2A378",
				"#F2DF78",
				"#EAFDCF"
			  ]
			}]
		  },
		  options: options
		});
	  });
	</script>
	<!-- /Doughnut Chart -->

  </body>
</html>
